package com.xiang.test;

import com.xiang.bean.A;
import com.xiang.bean.B;
import com.xiang.bean.Person;
import com.xiang.config.MyConfig;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class  MyTest02 {
	public static void main(String[] args) {
        //System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles", "true");
		//System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "C:\\class");
//	    ApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);
//		Person bean = (Person) applicationContext.getBean("person");
//		bean.myTest();
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application.xml");
		A bean = applicationContext.getBean(A.class);
		B bean1 = applicationContext.getBean(B.class);
		bean.myTest();
		//bean1.test();
	}
}
